<template>
  <!--
  @name: Index
  @data: 2024/7/8 11:53
-->
  <div id="hy-component">
    <HyForm
      :form="paramsForm"
      :label-width="formConfig.labelWidth"
      :form-model-list="formConfig.formModelList"
      :item-width="formConfig.itemWidth"
      :require-asterisk-position="formConfig.requireAsteriskPosition"
      :inline="formConfig.inline"
      :label-position="formConfig.labelPosition"
      :show-message="formConfig.showMessage"
      :inline-message="formConfig.inlineMessage"
      :size="formConfig.size"
      :scroll-to-error="formConfig.scrollToError"
      :method="formConfig.method"
      :url="formConfig.url"
      :data="formConfig.data"
      :params="formConfig.params"
      :query="formConfig.query"
      :submit-btn-title="formConfig.submitBtnTitle"
      :cancel-btn-title="formConfig.cancelBtnTitle"
      :request-callback="formConfig.requestCallback"
      :response-callback="formConfig.responseCallback"
      :cancel-btn-call-back-fun="formConfig.cancelBtnCallBackFun"
      :is-readonly="formConfig.isReadonly"
    />
    <HyTable
      :width="tableConfig.width"
      :table-data="tableConfig.tableData"
      :column="tableConfig.column"
      :btn-position="tableConfig.btnPosition"
      :operating="tableConfig.operating"
      :selection="tableConfig.selection"
      :is-selection-by-row="tableConfig.isSelectionByRow"
      :pagination-config="tableConfig.paginationConfig"
      :is-show-pagination="tableConfig.isShowPagination"
      :page-size-field="tableConfig.pageSizeField"
      :page-size-default-num="tableConfig.pageSizeDefaultNum"
      :page-num-field="tableConfig.pageNumField"
      :page-num-default-num="tableConfig.pageNumDefaultNum"
      :url="tableConfig.url"
      :request-callback="tableConfig.requestCallback"
      :params="tableConfig.params"
      :data="tableConfig.data"
      :response-callback="tableConfig.responseCallback"
      :headers="tableConfig.headers"
      :method="tableConfig.method"
      :form="paramsForm"
      :external-btn-list="tableConfig.externalBtnList"
      :internal-btn-list="tableConfig.internalBtnList"
    />
  </div>
</template>
<script setup lang="ts">
import {defineProps} from "vue";
import type HyFormInterface from "@/interface/HyFormInterface";
import type HyTableInterface from "@/interface/HyTableInterface";
// @ts-ignore
import HyForm from "@/components/HyForm.vue";
import HyTable from "@/components/HyTable.vue";
interface HyComponent{
  /** form表单的json配置 */
  formConfig: HyFormInterface,
  /** 表格的json配置 */
  tableConfig: HyTableInterface,
}
const props=defineProps<HyComponent>();

</script>
<style scoped>

</style>
